package kr.ac.inha.vota;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.widget.ImageView;

public class OpicEndActivity extends Activity {
	ImageView imgBtn;

    @Override
    public void onCreate(Bundle savedInstanceState) {
    	RecordActivity.recordActivity.finish();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_opic_end);
        
        imgBtn = (ImageView)findViewById(R.drawable.index);
        mHandler.sendEmptyMessageDelayed(0, 5000);
    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
    	if(event.getAction() == KeyEvent.ACTION_DOWN) {
    		if(keyCode == KeyEvent.KEYCODE_BACK) {
        		return false;
    		}
    	}
    	
    	// TODO Auto-generated method stub
    	return super.onKeyDown(keyCode, event);
    }
    
    Handler mHandler = new Handler(){
    	public void handleMessage(Message msg){
    		Intent intent;
    		intent = new Intent(OpicEndActivity.this, MainActivity.class);
    		startActivity(intent);
    		finish();
    	}
    };
}
